import Vue from 'vue'
import Router from 'vue-router'


Vue.use(Router)

export default new Router({
  routes: [
    {
        path: '/',
        redirect: '/home'
    },
    {
      path: '/',
      component: res => require(['@/pages/tabs'], res),
      children: [
        {
          path : 'home' ,
          component: res => require(['@/pages/home'], res) ,
        },
        {
          path : 'online' ,
          component: res => require(['@/pages/online'], res) ,
        },
        {
          path : 'my' ,
          component: res => require(['@/pages/my'], res) ,
        },
      ]
    },

    { path: '/home/detail/:id' , component: res => require(['@/pages/home/detail'], res) },
    { path: '/home/ddcl/:id' , component: res => require(['@/pages/home/ddcl'], res) },
    { path: '/home/zybl/:id' , component: res => require(['@/pages/home/ddcl/zybl'], res) },
    { path: '/home/xtxx/:id' , component: res => require(['@/pages/home/xtxx'], res) },
    { path: '/home/blxq/:id' , component: res => require(['@/pages/home/xtxx/blxq'], res) },

    { path: '/online/fqdd' , component: res => require(['@/pages/online/fqdd'], res) },
    { path: '/online/wdyb' , component: res => require(['@/pages/online/wdyb'], res) },

    { path: '/my/wddb' , component: res => require(['@/pages/my/wddb'], res) },
    { path: '/my/wdcb' , component: res => require(['@/pages/my/wdcb'], res) },
    { path: '/my/wdyb' , component: res => require(['@/pages/my/wdyb'], res) },
    { path: '/my/wdxx' , component: res => require(['@/pages/my/wdxx'], res) },
  ]
})
